package br.com.dojo.entity;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="fatura")
public class Fatura implements Serializable {

	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Long idFatura;
	
	@ManyToOne
	@JoinColumn(name="Locacao_idLocacao",referencedColumnName="idLocacao")
	private Locacao locacao;
	
	private Float total;
	
	private String status;
	
	@OneToMany(mappedBy = "fatura")	
	private List<Itemfatura> itemfaturas;

	
	public Long getIdFatura() {
		return this.idFatura;
	}

	public void setIdFatura(Long idFatura) {
		this.idFatura = idFatura;
	}

	public Locacao getLocacao() {
		return this.locacao;
	}

	public void setLocacao(Locacao locacao) {
		this.locacao = locacao;
	}

	public Float getTotal() {
		return this.total;
	}

	public void setTotal(Float total) {
		this.total = total;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public List<Itemfatura> getItemfaturas() {
		return this.itemfaturas;
	}

	public void setItemfaturas(List<Itemfatura> itemfaturas) {
		this.itemfaturas = itemfaturas;
	}

}
